const path = require('path');

function resolve(dir) {
  return path.join(__dirname, dir);
}

const BASE_URL = process.env.NODE_ENV === 'production' ? '/' : '/';
module.exports = {
  devServer: {
    port: 10011
  },
  css: {
    loaderOptions: {
      less: {
        modifyVars: {
        },
        javascriptEnabled: true
      }
    }
  },
  publicPath: BASE_URL,
  outputDir: 'dist',
  lintOnSave: true,
  chainWebpack: (config) => {
    config.resolve.alias
      .set('@', resolve('src'))
      .set('_assets', resolve('src/assets'))
      .set('_views', resolve('src/views'))
      .set('_configs', resolve('src/config'));
  },
  pluginOptions: {
    graphqlMock: false,
    apolloEngine: false,
  },
};
